<template>
    <div style="display:flex;flex-direction:column;width:100%;margin-top:25px">
        <div style="margin-bottom:10px;background:#eee;line-height:40px;padding-left:5px">产品更改明细</div>
         <p-table
            ref="table"
            size="middle"
            bordered
            rowKey="id"
            :scroll='tableScroll'
            :columns="defColumns"
            :dataSource="dataSource"
            :pagination="ipagination"
            :loading="loading"
            :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
            @change="handleTableChange">
      </p-table>
    </div>
</template>
<script>
export default {
    data(){
        return {
            // 表头
        defColumns: [
          {
            title: "序号",
            dataIndex: '',
            key:'rowIndex',
            width:60,
            align: 'center',
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
          },
          {
            title:'生产订单号',
            align: 'center',
            dataIndex: 'billNum',
          },
          {
            title:'物料编码',
            align: 'center',
            dataIndex: 'billOri',
          },
          {
            title:'物料名称',
            align: 'center',
            dataIndex: 'billOriNum',
          },
          {
            title:'序列号',
            align: 'center',
            dataIndex: 'createBy',
          },
          {
            title:'库位',
            align: 'center',
            dataIndex: 'productCodeChangeBefore',
          },
        ],
        /* 分页参数 */
        ipagination: {
          current: 1,
          pageSize: 10,
          pageSizeOptions: ['10', '20', '50'],
          showTotal: (total, range) => {
            return range[0] + "-" + range[1] + " 共" + total + "条"
          },
          showQuickJumper: true,
          showSizeChanger: true,
          total: 0
        }
        }
    }
}
</script>